package com.hmy.finance.api.bo.core.request.enums;


import lombok.Getter;
import org.apache.catalina.Manager;

@Getter
public enum ReceiptOffsetBillQueryStatusEnum {

//    All(0, "全部", "全部"),

    AREA_MANAGER_APPROVE_ING(1, "审批中", "审批中"),

    FINISHED(2, "已结束", "已结束"),

    REVOKE(3, "已撤销", "已撤销"),

    REJECTED(4, "已驳回", "已拒绝"),

    CANCEL(5, "已作废", "已作废"),

    DRAFT(6, "草稿", "草稿"),

    FINANCE_MANAGER_FINISHED(7, "已结束", "财务经理已结束");


    /**
     * 状态code
     */
    private Integer statusCode;

    /**
     * 前端显示状态
     */
    private String displayDesc;

    /**
     * 状态描述
     */
    private String statusDesc;

    ReceiptOffsetBillQueryStatusEnum(Integer statusCode, String displayDesc, String statusDesc) {
        this.statusCode = statusCode;
        this.displayDesc = displayDesc;
        this.statusDesc = statusDesc;
    }

    public static String getDisPlayDescByType(Integer type) {
        for (ReceiptOffsetBillQueryStatusEnum receiptOffsetBillQueryStatusEnum : ReceiptOffsetBillQueryStatusEnum.values()) {
            if (receiptOffsetBillQueryStatusEnum.getStatusCode().intValue() == type) {
                return receiptOffsetBillQueryStatusEnum.getDisplayDesc();
            }
        }
        return null;
    }

    public static ReceiptOffsetBillQueryStatusEnum getEnumByType(Integer type) {
        for (ReceiptOffsetBillQueryStatusEnum receiptOffsetBillQueryStatusEnum : ReceiptOffsetBillQueryStatusEnum.values()) {
            if (receiptOffsetBillQueryStatusEnum.getStatusCode().intValue() == type) {
                return receiptOffsetBillQueryStatusEnum;
            }
        }
        return null;
    }

}
